/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package cardgame;

import java.io.File;

/**
 *
 * @author Carl
 */
public class Launcher_Test{
    
    public static void main(String[] args){
        FrameUtil.initProgramProperties();
        java.awt.EventQueue.invokeLater(new Runnable(){

            @Override
            public void run(){
                ServerLauncher serverLauncher = new ServerLauncher(ServerLauncher.generatePort_Random());
                MainFrame mainFrame1 = new MainFrame(Launcher.connect("localhost", serverLauncher.getPort()));
                mainFrame1.joinGame(DeckFileHandler.load(new File(PanDeckEditor.DIRECTORY_DECKS + "darkness.xml")));
                mainFrame1.setLocation((int) (mainFrame1.getLocation().getX() - (mainFrame1.getWidth() / 2)), (int) mainFrame1.getLocation().getY());
                mainFrame1.setVisible(true);
                MainFrame mainFrame2 = new MainFrame(Launcher.connect("localhost", serverLauncher.getPort()));
                mainFrame2.joinGame(DeckFileHandler.load(new File(PanDeckEditor.DIRECTORY_DECKS + "light.xml")));
                mainFrame2.setLocation((int) (mainFrame2.getLocation().getX() + (mainFrame2.getWidth() / 2)), (int) mainFrame2.getLocation().getY());
                mainFrame2.setVisible(true);
            }
        });
    }
}
